#pragma once

#include "TcpSocket.hpp"
#include "TcpConnectSocket.hpp"

class TcpListenSocket
{
public:
    TcpListenSocket(uint16_t port)
    {
        _socket = new TcpSocket();
        _socket->createListenSocket(port);
    }

    TcpConnectSocket accept(std::string* peerIp, uint16_t* peerPort)
    {
        return _socket->accept(peerIp, peerPort);
    }

    ~TcpListenSocket()
    {}
private:
    Socket* _socket;
};